package com.woniuxy.service.impl;

import com.woniuxy.dao.UserDao1;
import com.woniuxy.service.UserService;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: 马宇航
 * @Todo: TODO
 * @DateTime: 01/19/0019 下午 3:08
 * @Component: 成都蜗牛学苑
 **/
public class UserServiceImpl implements UserService {
    UserDao1 userDao;

    public void setUserDao1(UserDao1 userDao) {
        this.userDao = userDao;
    }

    public UserServiceImpl() {
    }

    public UserServiceImpl(UserDao1 userDao) {
        this.userDao = userDao;
    }

    @Override
    public List<Map<String, String>> findAll() {
        Map<String, String> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("account","test");
        userDao.insert(objectObjectHashMap);
        return  userDao.findAll();
    }
}
